<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template2.xhtml">


        <ui:define name="title">
            <h:outputText value="Matriz Tareas"></h:outputText>
        </ui:define>

        <ui:define name="body">
            <h:form id="MatrizObjetivosListForm">
                <p:panel header="Matriz Tareas">
                    <p:dataTable id="datalist" value="#{tareaController.items}" var="item"
                                 selectionMode="single" selection="#{tareaController.selected}"
                                 paginator="true" style="margin-bottom:20px"
                                 rowKey="#{item.idtarea}"
                                 rows="10"
                                 rowsPerPageTemplate="10,20,30,40,50"
                                 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {Exporters}" 
                                   
                                 >
                        
                        <f:facet name="{Exporters}">
 
                            <h:commandLink>
                                <p:graphicImage name="resources/pdf.png" width="24" alt="Imprimir"/>
                                <p:dataExporter type="pdf" target="datalist" fileName="matriztareas" />
                            </h:commandLink>

                        </f:facet>
                        
                        <p:column width="60">
                            <f:facet name="header">
                                <h:outputText value="Id Tarea"/>
                            </f:facet>
                            <h:outputText value="#{item.idtarea}"/>
                        </p:column>
                        <p:column width="200">
                            <f:facet name="header">
                                <h:outputText value="Descripcion"/>
                            </f:facet>
                            <h:outputText value="#{item.descripcion}"/>
                        </p:column>
                        <p:column width="80">
                            <f:facet name="header">
                                <h:outputText value="Duracion"/>
                            </f:facet>
                            <h:outputText value="#{item.duracion}"/>
                        </p:column>
                        <p:column width="100">
                            <f:facet name="header">
                                <h:outputText value="Fecha Inicio"/>
                            </f:facet>
                            <h:outputText value="#{item.FInicio}"/>
                        </p:column>
                        <p:column width="100">
                            <f:facet name="header">
                                <h:outputText value="Fecha Fin"/>
                            </f:facet>
                            <h:outputText value="#{item.FFin}"/>
                        </p:column>
                        
                        <p:column width="80">
                            <f:facet name="header">
                                <h:outputText value="Responsable"/>
                            </f:facet>
                            <h:outputText value="#{item.responsable}"/>
                        </p:column>
                        <p:column width="200">
                            <f:facet name="header">
                                <h:outputText value="Items Control"/>
                            </f:facet>
                            <h:outputText value="#{item.itemsControl}"/>
                       </p:column>
                        <p:column width="150">
                            <f:facet name="header">
                                <h:outputText value="Objetivo"/>
                            </f:facet>
                            <h:outputText value="#{item.objetivoEstrategicoIdobjetivoEstrategico.definicion}"/>                           
                        </p:column>
                    </p:dataTable>
                </p:panel>
            </h:form>

        </ui:define>
    </ui:composition>

</html>